<?php
/* @var $this BannerController */
/* @var $model Banner */

$this->breadcrumbs=array(
	'Banners'=>array('index'),
	//$model->name,
);

$this->menu=array(
	array('label'=>'List Banner', 'url'=>array('index')),
	array('label'=>'Create Banner', 'url'=>array('create')),
	array('label'=>'Update Banner', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Banner', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Banner', 'url'=>array('admin')),
);
?>
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
    <ul class="breadcrumb">
        <li><i class="ace-icon fa fa-home home-icon"></i><a href="<?=$this->createUrl('default/index')?>">首页</a></li>
        <li><a href="<?=$this->createUrl('banner/index')?>">Banner类型</a></li>
        <li><a href="<?=$this->createUrl('banners',array('id'=>$model->id))?>">Banner列表</a></li>
        <li class="active">Banner详情</li>
    </ul><!-- /.breadcrumb -->
    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                <i class="ace-icon fa fa-search nav-search-icon"></i>
            </span>
        </form>
    </div><!-- /.nav-search -->
</div><!-- /.breadcrumbs -->
<div class="page-content">
    <div class="page-header">
        <h1>Banner详情
            <small><i class="ace-icon fa fa-angle-double-right"></i> Banners View</small>
        </h1>
    </div><!-- /.page-header -->
    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <div class="row">
                <div class="col-xs-12">
                        <?php $this->widget('zii.widgets.CDetailView', array(
                            'data'=>$model,
                            'htmlOptions'=>array('id'=>'simple','class'=>'table table-bordered table-hover',),
                            'attributes'=>array(
                                'id',
                                'name'=>array('label'=>'标识','value'=>function($model){return $model->name;}),
                                'tips'=>array('label'=>'类型描述','value'=>function($model){return $model->tips;}),
                                'img'=>array('label'=>'图片','type'=>'raw','value'=>function($model){if( empty($model->img) ) return '';return "<img style='max-width:200px;max-height:200px' src='" . $model->img . "'>";}),
                                'target'=>array('label'=>'新窗口打开','value'=>function($model){ Constants::getTargetOpenMethod($model->target);}),
                                'link'=>array('label'=>'链接','value'=>function($model){return $model->link;}),
                                'sort'=>array('label'=>'排序','value'=>function($model){return $model->sort;}),
                                array('label'=>'状态','value'=>function($model){return Constants::getYesNoItems($model->status);}),
                                'desc'=>array('label'=>'描述','value'=>function($model){return $model->desc;}),
                            ),
                        ));?>
                </div><!-- /.span -->
            </div><!-- /.row -->
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->
